package com.zijie.members.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor

@TableName("member")//对应的数据库表：会员表
public class Members {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;//主键
    @TableField(condition = SqlCondition.LIKE, whereStrategy = FieldStrategy.NOT_EMPTY)
    private String account;//用户名;
    private String password;//密码
    private Boolean enabled;//是启用：默认1：true
    @TableField(condition = SqlCondition.LIKE, whereStrategy = FieldStrategy.NOT_EMPTY)
    private String name;//姓名，全名 ，也可能是英文名
    @TableField(condition = SqlCondition.LIKE, whereStrategy = FieldStrategy.NOT_EMPTY)
    private String pinyin;//拼音
    private String pinyinUntoned;//中文姓名的全拼形式
    @TableField(condition = SqlCondition.LIKE, whereStrategy = FieldStrategy.NOT_EMPTY)
    private String firstName;//名 ，仅名
    @TableField(condition = SqlCondition.LIKE, whereStrategy = FieldStrategy.NOT_EMPTY)
    private String lastName;//姓氏
    private String sex;//性别
    private LocalDate birthday;//出生日期
    private Integer height;//身高；
    private BigDecimal weight;//体重
    private Integer iq;//智商指数
    @TableField(condition = SqlCondition.LIKE, whereStrategy = FieldStrategy.NOT_EMPTY)
    private String qq;
    private String wechat;
    @TableField(condition = SqlCondition.LIKE, whereStrategy = FieldStrategy.NOT_EMPTY)
    private String phone;
    @TableField(condition = SqlCondition.LIKE, whereStrategy = FieldStrategy.NOT_EMPTY)
    private String email;
    private Integer nativePlaceId;//籍贯所在地编号
    private String cardId;//身份证号
    private String politicalOrientation;//政治面貌
    private Integer addressId;//家庭地址编号
    private String addressDetail;//地址详情
    private String race;//种族，民族
    private String religion;//宗教
    private String nationality;//国籍
    private String portrait;//头像
    private String description;//备注
    private LocalDateTime lastLoginTime;
    private String lastLoginIp;//最后一次登录IP地址
    private String extraInfo;//额外的用户信息
    private LocalDateTime createdTime;//创建时间
    private String createdBy;//记录创建人
    private LocalDateTime updatedTime;
    private String updatedBy;
    private Integer version;
//    addrDetail
    @TableField(exist = false)//字段中没有映射，但可以查询
    private String addrDetail; // 地址详情，在地址表中查询,实现多表关联

}